package com.clg.user;

import com.clg.common.tools.AppValidator;
import com.jfinal.core.Controller;

/**
 * Created by usercai on 2016/9/28.
 */
public class LoginValidator extends AppValidator {
    @Override
    protected void validate(Controller c) {
        validateRequiredString("loginName", "loginName", "请输入用户名");
        validateRequiredString("passWord", "passWord", "请输入密码");
    }

    @Override
    protected void handleError_(Controller c) {
        c.keepPara("loginName");
        c.render("login/login.html");
    }
}
